package com.example.demo.beans;


import jakarta.annotation.PostConstruct;

public class MyServiceX {

    private String name;

    public MyServiceX() {
        this.name = "Original Name";
    }

    // 通过 BeanPostProcessor 修改
    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    @PostConstruct
    public void init() {
        System.out.println("Initializing MyService: " + name);
    }
}
